import math
if __name__ == '__main__':
    h = float(input())
    r = float(input())
    bottoms = math.pi * r**2
    volume = h * bottoms
    s = 2*bottoms+2*math.pi*r*h
    print(f'{round(volume,4):.4f}')
    print(f'{round(s,4):.4f}')